-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-40784][SQL][TESTS] Check error classes in DDLParserSuite #38259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
cc @MaxGekk |
|
|
||
| private def parseException(sqlText: String): SparkThrowable = { | ||
| intercept[ParseException](parsePlan(sqlText)) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this function be shared with other Suites (e.g. #38265) so move this one to AnalysisTest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, i will move it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
@panbingkun Please, don't forget about another |
Done. |
|
Can one of the admins verify this patch? |
| } | ||
|
|
||
| protected def parseException(parser: String => Any)( | ||
| sqlText: String): ParseException = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be 4 spaces, see https://github.com/databricks/scala-style-guide#spacing-and-indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this next time.
|
+1, LGTM. Merging to master. |
|
LGTM! |
### What changes were proposed in this pull request? This PR aims to replace 'intercept' with 'Check error classes' in DDLParserSuite. include two files: A.org.apache.spark.sql.execution.command.DDLParserSuite B.org.apache.spark.sql.catalyst.parser.DDLParserSuite ### Why are the changes needed? The changes improve the error framework. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? By running the modified test suite: ``` $ build/sbt "test:testOnly *DDLParserSuite" ``` Closes apache#38259 from panbingkun/SPARK-40784. Authored-by: panbingkun <[email protected]> Signed-off-by: Max Gekk <[email protected]>
What changes were proposed in this pull request?
This PR aims to replace 'intercept' with 'Check error classes' in DDLParserSuite. include two files:
A.org.apache.spark.sql.execution.command.DDLParserSuite
B.org.apache.spark.sql.catalyst.parser.DDLParserSuite
Why are the changes needed?
The changes improve the error framework.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
By running the modified test suite: